ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Core.Data.ExpressionInfo Assembly / GrapeCity.Enterprise.Data.Expressions.Tools Namespace / EnumerableExtensions Class / Flatten Method / Flatten<T>(IEnumerable<T>,Func<T,IEnumerable<T>>) Method
Item type
Source collection.
function that returns a collection of children for each item

In This Topic
    Flatten<T>(IEnumerable<T>,Func<T,IEnumerable<T>>) Method
    In This Topic
    This method extends the LINQ methods to flatten a collection of items that have a property of children of the same type.
    Syntax
    'Declaration
     
    Public Overloads Shared Function Flatten(Of T)( _
       ByVal source As IEnumerable(Of T), _
       ByVal childSelector As Func(Of T,IEnumerable(Of T)) _
    ) As IEnumerable(Of T)

    Parameters

    source
    Source collection.
    childSelector
    function that returns a collection of children for each item

    Type Parameters

    T
    Item type

    Return Value

    Returns a one level list of elements of type T.
    See Also